import { stringify } from 'qs';
import request from '@utils/request';

export async function query({ page = 0, size = 10 }) {
  return request(`/api/sys/permission?${stringify({ page, size })}`);
}

export async function addRole({ name, identity, description }) {
  return request('/api/sys/permission', {
    method: 'POST',
    body: {
      name,
      identity,
      description,
    },
  });
}
